<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
	<head>
		<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>文章列表</title>

		<!-- bootstrap styles -->
		<link th:href="@{css/bootstrap.css}" th:rel="stylesheet" media="all" />
		<!-- icomoon styles -->
		<link th:href="@{css/font-awesome.css}" th:rel="stylesheet" media="all"/>
		<!-- google styles -->
		<link href="http://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet" />
		<link th:href="@{css/common.css}" th:rel="stylesheet"/>
		<link th:href="@{css/articles.css}" th:rel="stylesheet"/>

		<script th:src="@{js/jquery.min.js}"></script>
		<script th:src="@{js/bootstrap-3.1.1.min.js}"></script>
		<!-- jQuery Easing -->
		<script th:src="@{js/jquery.easing.1.3.js}"></script>
		<!-- Waypoints -->
		<script th:src="@{js/jquery.waypoints.min.js}"></script>
		<!-- Stellar Parallax -->
		<script th:src="@{js/jquery.stellar.min.js}"></script>
		<script th:src="@{js/articles.js}"></script>
	</head>
	<body class="articles">

		<div class="loader"></div>

		<div id="page">
			<div id="header" data-stellar-background-ratio="0.5" class="header">
				<nav role="navigation">
					<ul>
						<li><a th:href="index"><i class="fa fa-home"></i></a></li>
					</ul>
				</nav>
				<div class="page-title">
					<h2>[[${param.type}==null?${session.tag}:${param.type}]]</h2>
				</div>
			</div>
			<div id="main">
				<div th:each="article:${session.articles}" class="wrapper">
					<div class="article padding">
						<img th:src="@{img/dog.jpg}">
						<div>
							<span th:text="${#dates.format(article.createdTime,'yyyy年MM月dd日 HH:mm')}"></span>
							<h2><a th:href="@{get_article(aid=${article.aid})}" th:text="${article.name}"></a></h2>
							<p th:text="${article.description}"></p>
							<div th:if="${session.uid==article.uid}" style="font-size: 12px;margin-top: -30px;">
								<a th:href="@{modify_article(aid=${article.aid})}">修改</a>
								<a th:href="@{delete_article(aid=${article.aid})}">删除</a>
							</div>
						</div>
					</div>

				</div>
			</div>
		</div>

		<div class="gototop js-top">
			<a href="#" class="js-gotop"><i class="fa fa-arrow-up fa-2x"></i></a>
		</div>


	</body>
</html>

